Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start using -H instead of deprecated -h and -p. Fixes #49 #59

Merged
merged 4 commits into from
Jun 14, 2024

Conversation

gwarf
Copy link
Member

@gwarf gwarf commented Jun 10, 2024

Start using -H instead of deprecated -h and -p parameters on OpenLDAP 2.5, see https://openldap.org/doc/admin25/appendix-upgrading.html.

The -H parameter should be present since long, cf https://www.openldap.org/software/man.cgi?query=ldapadd&apropos=0&sektion=1&manpath=OpenLDAP+2.2-Release&arch=default&format=html.

Fix #49.

@gwarf gwarf requested a review from a team as a code owner June 10, 2024 14:04
@gwarf
Copy link
Member Author

gwarf commented Jun 10, 2024

I'm not familiar with this code and as no port is mentioned in that part, I'm not sure how to address the point below, any suggestion is welcome:

bdii/bin/bdii-update

Lines 271 to 278 in 411f76d

# Open pipe to LDIF
if source[:7] == 'ldap://':
url = source.split('/')
# TODO: use -H
# FIXME: where is my port?
command = "ldapsearch -LLL -x -h %s -b %s 2>/dev/null" % (
url[2], url[3])
pipe = os.popen(command)

…missing the default port 389 would likely be used.
@gwarf
Copy link
Member Author

gwarf commented Jun 10, 2024

I'm not familiar with this code and as no port is mentioned in that part, I'm not sure how to address the point below, any suggestion is welcome:

bdii/bin/bdii-update

Lines 271 to 278 in 411f76d

# Open pipe to LDIF
if source[:7] == 'ldap://':
url = source.split('/')
# TODO: use -H
# FIXME: where is my port?
command = "ldapsearch -LLL -x -h %s -b %s 2>/dev/null" % (
url[2], url[3])
pipe = os.popen(command)

I've just pushed a replacement with -H, assuming it may work: a1c135d

@gwarf
Copy link
Member Author

gwarf commented Jun 14, 2024

Could anyone from @EGI-Federation/bdii review this PR, please?

bin/bdii-update Outdated Show resolved Hide resolved
Copy link
Contributor

@enolfc enolfc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ellert ellert merged commit 9723de8 into EGI-Federation:main Jun 14, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bdii-update uses obsolete -h and -p flag
3 participants